import 'package:flutter/material.dart';

class Business extends StatefulWidget {
  @override
  _BusinessState createState() => _BusinessState();
}

class _BusinessState extends State<Business> {
  List newsList = [
    {
      'title': 'Thomas Friedman’s Reflection on the U.S., Using China as the Benchmark',
      'imgSrc': 'https://thechinaacademy.org/wp-content/uploads/2025/08/Friedman-768x512.webp?x51351',
      'date': 'August 4, 2025',
      'except': 'I Just Saw the Future. It Was Not in America.'
    },
    {
      'title': 'Why Doesn’t China Go for Zero Tariffs on U.S. Imports?	',
      'imgSrc': 'https://thechinaacademy.org/wp-content/uploads/2025/08/封面-3-864x467.webp?x51351',
      'date': 'August 4, 2025',
      'except': 'Chinese scholar makes an offer Trump can’t refuse.'
    },
    {
      'title': 'Who Writes the New Rules? A Return to Keynes’ Forgotten Bancor Plan?| Michael Hudson',
      'imgSrc': 'https://thechinaacademy.org/wp-content/uploads/2025/08/封面-2-864x467.webp?x51351',
      'date': 'August 4, 2025',
      'except': 'The Only Way Out of the Global South’s Debt Trap.'
    }
  ];

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Thinkers Forum'),
      ),
      body: ListView.builder(
        itemCount: newsList.length, // 列表项总数
        itemBuilder: (BuildContext context, int index) {
          return Container(
            color: Colors.white,
            margin: EdgeInsets.only(bottom: 10),
            padding: EdgeInsets.all(16),
            child: Column(
              mainAxisAlignment: MainAxisAlignment.start,
              crossAxisAlignment: CrossAxisAlignment.start,
              children: [
                Text(newsList[index]['title'], style: TextStyle(
                  color: Colors.black,
                  fontSize: 24,
                  fontWeight: FontWeight.w400
                ),),
                SizedBox(
                  height: 10,
                ),
                Image.network(newsList[index]['imgSrc'], width: double.infinity),
                SizedBox(
                  height: 10,
                ),
                Text(newsList[index]['date'], style: TextStyle(
                  color: Color.fromRGBO(119, 119, 119, 1),
                  fontSize: 14,
                  fontWeight: FontWeight.w400
                ),),
                SizedBox(
                  height: 10,
                ),
                Text(newsList[index]['except'], style: TextStyle(
                  color: Color.fromRGBO(119, 119, 119, 1),
                  fontSize: 14,
                  fontWeight: FontWeight.w400
                ),),
              ],
            ),
          );
        },
      ),
    );
  }
}